package com.book.lizhi;

import android.app.IntentService;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

import com.book.lizhi.util.AppLog;

public class DownloadIntentService extends IntentService {
	public static final String EXTRA_PARAM = "com.book.lizhi.extra.PARAM1";
	public static final String DOWNLOAD_AD_ACTION="download_ad_action";

	public DownloadIntentService() {
		super("DownloadIntentService");
		AppLog.e("DownloadIntentService");
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		if (intent != null) {
			String ID = intent.getStringExtra(EXTRA_PARAM);
			AppLog.e("into--[onHandleIntent]:" + ID);
			String id = intent.getStringExtra("id");
			AppLog.e("id:" + id);
			intent.setAction(DOWNLOAD_AD_ACTION);
			LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
		}
	}
}
